package com.zto.sch.base.normal.validator;

import lombok.Data;

/**
 * @program: sch-diy-parent
 * @description:
 * @author: sch
 * @create: 2021-06-30 18:16
 **/
@Data
public class RspDTO {
    private final static Integer SUCCESS_CODE = 0;
    private Integer code;
    private String msg;

    public RspDTO(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public static RspDTO success() {
        return new RspDTO(SUCCESS_CODE, null);
    }

    public static RspDTO success(String msg) {
        return new RspDTO(SUCCESS_CODE, msg);
    }
}
